@extends('home.seller.layout.index')

@section('content')
	<div class="mws-panel grid_8 mws-collapsible">
    <div class="mws-panel-header">
        <span>
            <i class="icon-table">
            </i>
            回复商品评论
        </span>
        <div class="mws-collapse-button mws-inset">
            <span>
            </span>
        </div>
    </div>
    <div class="mws-panel-inner-wrap">
        <div class="mws-panel-body no-padding">
            <div id="DataTables_Table_0_wrapper" class="dataTables_wrapper" role="grid">
	            <form action="/home/seller/goods/evaldetail" method="get">
	            	{{ csrf_field() }}
	            	<input type="hidden" name="id" value="{{ $id }}">
	                <div id="DataTables_Table_0_length" class="dataTables_length">
	                    <label>
	                        显示
	                        <select size="1" name="count" aria-controls="DataTables_Table_0">
	                            <option value="5" @if(!empty($request['count']) && $request['count'] == 5 ) selected @endif>
	                                5
	                            </option>
	                            <option value="10" @if(!empty($request['count']) && $request['count'] == 10 ) selected @endif>
	                                10
	                            </option>
	                            <option value="15" @if(!empty($request['count']) && $request['count'] == 15 ) selected @endif>
	                                15
	                            </option>
	                            <option value="20" @if(!empty($request['count']) && $request['count'] == 20 ) selected @endif>
	                                20
	                            </option>
	                        </select>
	                        条
	                    </label>
	                </div>
	                <div class="dataTables_filter" id="DataTables_Table_0_filter">
	                    <label>
	                        关键字:
	                        <input type="text" aria-controls="DataTables_Table_0" name="search" value="{{ $request['search'] or '' }}" placeholder="评论内容">
	                    </label>
	                    <button type="submit" class="btn btn-default"> 搜索 </button>
	                </div>
                </form>
                <table class="mws-table mws-datatable dataTable" id="DataTables_Table_0"
                aria-describedby="DataTables_Table_0_info">
                    <thead>
                        <tr role="row">
                            <th class="sorting_asc" role="columnheader" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" aria-sort="ascending" aria-label="Rendering engine: activate to sort column descending" style="width: 150px;">
                                评论者
                            </th>
                            <th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending" style="width: 100px;">
                                评论时间
                            </th>
                            <th class="sorting" role="columnheader" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" aria-label="Platform(s): activate to sort column ascending" style="width: 200px;">
                                评论内容
                            </th>
                        </tr>
                    </thead>
                    <tbody role="alert" aria-live="polite" aria-relevant="all">
                    @foreach($data as $k => $v)
                        <tr class="odd">
                            <td class=" sorting_1">
                                {{ $v['writer'] }}
                            </td>
                            <td class="">
                                {{ date('Y-m-d H:i:s',$v['ctime']) }}
                            </td>
                            <td class="">
                                {{ $v['content'] }}
                            </td>
                        </tr>
                        @endforeach
                    </tbody>
                </table>
                <div class="dataTables_info" id="DataTables_Table_0_info">
                    总共{{ $num }}条
                </div>
                <div id="page_page">
                	{!! $data -> appends($request) -> render() !!}
                </div>
            </div>
        </div>
    </div>
</div>
@endsection